package com.ztools.common.model.pc.information;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztools.common.model.pc.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * @author seeTools
 * @since 2023-06-02
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("information_point")
public class InformationPoint extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 会员ID
     */
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @TableField(exist = false)
    private String memberName;

    /**
     * 渠道
     */
    @TableField(value = "channel")
    private String channel;

    /**
     * 渠道名称
     */
    @TableField(exist = false)
    private String channelName;

    /**
     * 渠道ID
     */
    @TableField(value = "channel_id")
    private String channelId;

    /**
     * 操作积分
     */
    @TableField(value = "operation_points")
    private Integer operationPoints;

    /**
     * 操作类型（增加、减少）
     */
    @TableField(value = "operation_type")
    private String operationType;

    /**
     * 操作类型名称
     */
    @TableField(exist = false)
    private String operationTypeName;

    /**
     * 操作时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "operation_date")
    private Date operationDate;

    /**
     * 操作前积分
     */
    private Integer beforePoint;

    /**
     * 操作后积分
     */
    private Integer afterPoint;

}
